﻿@model IEnumerable<Alumnos.Models.Materia>

@{
    ViewBag.Title = "Listado de materias";
}

<h1>Lista de materias</h1>
<table class="table table-striped table-hover">
    <thead>
        <tr>
            <th>Id</th>
            <th>Materia</th>
            <th>Acciones</th>
        </tr>
    </thead>
    <tbody>
               
        @foreach (Alumnos.Models.Materia cadaMateria in Model)
        {
            <tr>
                <td>@cadaMateria.Id</td>
                <td>@cadaMateria.Nombre</td>
                <td>
                    @Html.ActionLink("Editar", "Editar", new { id = cadaMateria.Id })
                    @Html.ActionLink("Borrar", "Borrar", new { id = cadaMateria.Id })
                </td>
            </tr>
        }
    </tbody>
</table>  
<a href="@Url.Action("Agregar", "Materia")">Agregar nueva materia</a>
